package ru.fivestarter.entities.diary;

import java.io.Serializable;
import java.lang.Integer;
import java.lang.String;
import javax.persistence.*;

import ru.fivestarter.entities.leonardo.UsersLeo;

/**
 * Entity implementation class for Entity: GoalMonth
 *
 */
@Entity
@Table(name="GoalMonth", schema="diary")
@NamedQuery(name="GoalMonth.findByYearGoalMonthUser",
			query="SELECT gm FROM GoalMonth gm WHERE gm.yearGoal=:yearD AND gm.month_of_year=:monthD AND gm.user=:userD" )
public class GoalMonth implements Serializable {

	   
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="KEY_DIARY")
	private Integer keyDiary;
	@Column(nullable=false, unique=false)
	private Integer yearGoal;
	@Column(nullable=false, unique=false)
	private Integer month_of_year;
	@Lob
	private String goal;
	@ManyToOne
	@JoinColumn(name="login", nullable=false)
	private UsersLeo user;
	private static final long serialVersionUID = 1L;

	public GoalMonth() {
		super();
	} 
	
	public Integer getKeyDiary() {
		return this.keyDiary;
	}

	public void setKeyDiary(Integer keyDiary) {
		this.keyDiary = keyDiary;
	}   
	
	public String getGoal() {
		return this.goal;
	}

	public void setGoal(String goal) {
		this.goal = goal;
	}
	public UsersLeo getUser() {
		return user;
	}
	public void setUser(UsersLeo user) {
		this.user = user;
	}
	public Integer getYear() {
		return yearGoal;
	}
	public void setYear(Integer year) {
		this.yearGoal = year;
	}
	public Integer getMonth() {
		return month_of_year;
	}
	public void setMonth(Integer month_of_year) {
		this.month_of_year = month_of_year;
	}

	
    
}
